cmake_minimum_required(VERSION 3.4.1)

add_library( djvu

             SHARED

             src/main/cpp//GPixmap.cpp
             src/main/cpp//atomic.cpp
             src/main/cpp//JB2EncodeCodec.cpp
             src/main/cpp//DataPool.cpp
             src/main/cpp//ZPCodec.cpp
             src/main/cpp//GScaler.cpp
             src/main/cpp//JPEGDecoder.cpp
             src/main/cpp//DjVuDumpHelper.cpp
             src/main/cpp//DjVuGlobalMemory.cpp
             src/main/cpp//DjVuToPS.cpp
             src/main/cpp//IW44Image.cpp
             src/main/cpp//DjVuPort.cpp
             src/main/cpp//GString.cpp
             src/main/cpp//GURL.cpp
             src/main/cpp//GUnicode.cpp
             src/main/cpp//ByteStream.cpp
             src/main/cpp//MMX.cpp
             src/main/cpp//DjVuDocument.cpp
             src/main/cpp//GMapAreas.cpp
             src/main/cpp//DjVmNav.cpp
             src/main/cpp//DjVuFileCache.cpp
             src/main/cpp//DjVuNavDir.cpp
             src/main/cpp//DjVuText.cpp
             src/main/cpp//DjVuGlobal.cpp
             src/main/cpp//GException.cpp
             src/main/cpp//miniexp.cpp
             src/main/cpp//GSmartPointer.cpp
             src/main/cpp//MMRDecoder.cpp
             src/main/cpp//DjVuPalette.cpp
             src/main/cpp//DjVuMessage.cpp
             src/main/cpp//DjVuFile.cpp
             src/main/cpp//UnicodeByteStream.cpp
             src/main/cpp//DjVmDoc.cpp
             src/main/cpp//DjVuErrorList.cpp
             src/main/cpp//DjVuAnno.cpp
             src/main/cpp//DjVmDir0.cpp
             src/main/cpp//XMLParser.cpp
             src/main/cpp//DjVuInfo.cpp
             src/main/cpp//XMLTags.cpp
             src/main/cpp//GBitmap.cpp
             src/main/cpp//DjVmDir.cpp
             src/main/cpp//GIFFManager.cpp
             src/main/cpp//DjVuMessageLite.cpp
             src/main/cpp//GRect.cpp
             src/main/cpp//GOS.cpp
             src/main/cpp//DjVuDocEditor.cpp
             src/main/cpp//Arrays.cpp
             src/main/cpp//BSByteStream.cpp
             src/main/cpp//GContainer.cpp
             src/main/cpp//IW44EncodeCodec.cpp
             src/main/cpp//ddjvuapi.cpp
             src/main/cpp//DjVuImage.cpp
             src/main/cpp//debug.cpp
             src/main/cpp//JB2Image.cpp
             src/main/cpp//IFFByteStream.cpp
             src/main/cpp//BSEncodeByteStream.cpp
             src/main/cpp//GThreads.cpp )

include_directories( src/main/cpp src/main/cpp )

add_definitions( -DHAVE_CONFIG_H )

find_library( log-lib log )

target_link_libraries( djvu ${log-lib} )
